home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
002
/
pc_pad.arc
/
PC-PAD.DOC
< prev
next >
Wrap
Text File
|
1987-07-18
|
21KB
|
413 lines
PC\PAD USER'S GUIDE 4/08/83
PC\PAD (ver. 1.3)
A Word Processing/Spreadsheet Program
For the IBM Personal Computer
(c) 1983 by ╨. Fraundorf
P.O. Box 11394
St. Louis MO 63105
TABLE OF CONTENTS
I. General Information
II. Getting Started
III. The MS-BASIC full-screen line-editor
IV. The Twenty Programmed Functions
V. View and Help
VI. Window Movement Keys
VII. Text Processing Keys
VIII. Spreadsheet Programming
IX. Saving and Printing
X. Future Directions
XI. Disclaimer
If you are using this program and find it of value,
a contribution ($20 suggested) will be appreciated.
Regardless of whether you make a contribution,
you are encouraged to copy and share this program.
I. GENERAL INFORMATION:
PC\PAD is a word processing/ spreadsheet (or "wordsheet")
program designed around the MS-BASIC full-screen line-editor to
provide text-editing, spreadsheet computation, and printing
capabilities with minimum complication. Its design is based on
the thought that many users of such software would prefer a
simple set of useful functions (with option to expand to meet
special needs) instead of the general capability (and hence
complexity) built into bigger programs. It uses the programmable
function keys on the IBM keyboard to build on capabilities of the
resident editor. This approach economizes on program size (around
9K bytes) while providing full support of the familiar BASIC
editing protocols. Commands, especially at the character and word
level, once mastered for either PC\PAD or the BASIC editor, are
thus automatically mastered for both.
The program is itself written in BASIC, with a modular
structure for easy modification or expansion. In addition
to making the BASIC editor available for work on text files,
PC\PAD provides: (i) a 256-character (16 column) by N-row text
area* which is spreadsheet programmable using simple BASIC
routines; (ii) the programmed line-operations of Enter, Yank,
Put, Block-Insert, Block-Delete and Right-Justify for manuscript
preparation; and (iii) a routine for IBM/EPSON printing with
variable margins, line-spacings, and even subscripts if needed.
Along with this user's guide (file PC\PAD.DOC), PC\PAD provides
an on-line "help file" to aid user's in implementing these
functions.
PC\PAD as written is set up for an IBM-PC with 64K of memory
(48K should work), a single disk drive, and an 80-column monitor.
A printer is optional, although probably desirable. As indicated
above, it also requires IBM's disk BASIC (or BASICA) to run. The
BASIC workspace has room for nearly 30K characters of text with a
64K system, probably around 14K with 48K.
A limited license is granted to all users of this program,
to make copies and distribute them to other users, on the
following conditions:
1. that the notices contained in lines 20 through 180 of
the program are not altered or removed;
2. that the program is distributed along with this
documentation to others in unmodified form; and
3. that no fee is charged for copying or distributing the
program without an express written agreement with the
author.
The PC\PAD marketing philosophy of voluntary user support
bears similarities to that employed in the marketing of FREEWARE
(a trademark of The Headlands Press, Inc.). User response is
welcome, in the form of ideas and/or funds in return for a useful
product. My ability to issue upgrades through established
distribution channels (I am NOT equipped to provide program
copies on request) will reflect the extent of that response.
*N depends on RAM available in the BASIC program buffer. With a
64K system, this file (nearly 400 lines) fits, but speed suffers.
II. GETTING STARTED:
There are numerous files on your disk. As you may have
discovered, the file PC\PAD.DOC contains this user's guide. The
program itself is in file PC\PAD.BAS. This program can be run in
the usual way from BASIC (type: run "pc\pad"), or started from
DOS by using the batch file PC\PAD.BAT (type: pc\pad). The ".BAS"
version of the program listings have had comments and formatting
removed to save core memory space. A fully commented version of
the source listings is found in file PC\PAD.LST.
Because PC\PAD utilizes the disk operating system and BASIC,
it is helpful to transfer the PC\PAD files to a system disk
containing BASIC. This also serves to "back up" your original
copy of the program. These files can be transferred individually
(only PC\PAD.BAS is needed to run the program), or the full set
can be transferred using the batch file "COPYPAD.BAT" (in DOS
type: copypad). Note that drives A and B refer to source and
target disks, respectively.
Finally, a demo "wordsheet" file (DEMOPAD) to provide a
taste of PC\PAD capabilities, and a general purpose spreadsheet
instruction program for keeping row-column totals (ROWCOL.BAS),
are included on the disk as well.
When you run PC\PAD, the program begins with a
title/information page, and the prompt "any key to continue...".
Push any single key, and the program then lists the files on the
disk, and requests a disk file name. If none is given, it
assumes that you want to start from scratch. In either case, it
then asks for a working file name: the filename under which the
product of this editing session is to be stored. Perhaps the best
way to get a feel for the program is to initially specify DEMOPAD
as the disk file, and DEMOPAD.J as the working file name (it's OK
to specify filenames in lowercase for convenience). Then follow
the instructions shown in the file.
Where starting is first discussed, quitting should also be
mentioned. Key [F10] saves a working file to disk. Pressing
backslash twice, the letter q, and Enter initiates request for a
new filename without saving the working file. This sequence is
intentionally complicated, because it should not be executed
thoughtlessly without first saving an important file. Two
consecutive Enters after that (to each of the filename prompts)
exits the program. Ctrl-Break at most any time does that as well.
III. THE MS-BASIC FULL-SCREEN LINE-EDITOR.
Possibly one of the most economical things that PC\PAD does
is that it makes the BASIC program editor available for work on
text files. Now if you edit BASIC programs, you don't need to
master new protocols to edit text, and vice versa.
The editor functions that become available include character
operations (Destructive-Backspace, Insert, Delete, Alt-###),
cursor movements (Up, Down, Left, Right, Next-Word,
Previous-Word, Home, End), tab, erase line (Esc), erase to end of
line (Ctrl-End), and print screen (Shift-PrtSc). These functions
are documented in some detail on pp. 2-13 through 2-31 of the IBM
BASIC Manual (2nd Edition, ver. 1.1), and hence will not be
discussed here.
The Enter function, perhaps the most fundamental for
operation of the BASIC editor, plays a similar role for PC\PAD.
However unlike the functions mentioned above, the PC\PAD Enter
function is a programmed operation which differs from the BASIC
Enter function. First, it Enters into the working file ONLY the
physical screen line immediately above the cursor position after
execution; not the literal line (which may take up several screen
lines due to wraparound) as in the case of the BASIC screen
editor. For this reason, if a screen gets "contaminated" with
wraparound lines (for example when the cursor is allowed to run
off the right edge of the screen and logically link two screen
lines), then the best bet is to relist the screen using the View
function [F1] before trying to read modifications back into the
file. Secondly, because PC\PAD Enter is programmed in BASIC, it
operates a bit slower than the BASIC editor version, and hence is
a prime candidate for an assembler routine in future upgrades.
Suggestions are invited.
IV. THE TWENTY PROGRAMMED FUNCTIONS.
In addition to making BASIC editor functions available for
work on text, PC\PAD provides a set of add-on functions, chosen
to make PC\PAD able to perform a wide range of word processing
and spreadsheet operations. The set of available functions has
been kept small and simple so that telling the computer what you
want to do is also simple. Although there is no reason why you
couldn't expand this set of functions, it is also possible to
stick with it while specializing individual functions to your
needs (or eliminating them altogether). Most individual
functions are sandwiched in the program listing (PC\PAD.LST)
between rows of double-dashes (=====) for easy identification.
The programmed functions that have been chosen for this
version of PC\PAD fall naturally into five operational
categories, each of which will be taken up in succeeding
sections. In order to implement these functions, a particular
ASCII character (here the "backslash" symbol 092) has been given
special status as a control character. If you try to Enter a
screen line containing this character in combination with control
words (like "view "), the line will not be Entered but instead
the indicated function performed. Also control characters cannot
be Entered at all during Line-Insert mode. Although "backslash"
is a convenient choice of control symbol for my applications, a
different one may suit yours, and hence the program is written to
allow redefinition of the control character (variable CC$) in
line 190 of the program.
V. VIEW AND HELP.
View and Help are two "information" functions assigned to
the [F1] key. By their nature, they change no parameters, but
are designed simply to inform you of an existing state of
affairs. The Help function, invoked with backslash [F1], simply
lists the 20 programmed functions and their key assignments for
reference when needed. The View function, invoked with [F1],
puts an image of the present "window" into the working file up on
the screen. Since the screen can be changed independently of the
file, it is often useful to push [F1] to clarify the file status
if there is reason to think that correspondence between screen
and file has been lost. This function is automatically invoked
on completion of some of the other function calls, so that the
operator is updated appropriately concerning changes in the file,
or the window into it.
VI. WINDOW MOVEMENT KEYS.
As indicated earlier, the working file (or wordsheet) is
made up of a 256-character (16 "column") by N-line text area.
The division of the wordsheet into equally spaced "columns", each
16 characters wide, is done to simplify spreadsheet programming.
Through use of the View function, the screen provides an
80-character (5 "column") by 23-line window onto that wordsheet.
The 25th line of the screen provides the usual function key
labels, while the 24th line pinpoints the location of the window.
When the file is first opened, the window is located in the
upper left hand corner of the wordsheet. On the screen one sees
lines 0 to 22, and "columns" 0 to 4.
Movement of this window is controlled with the window
movement keys [F3] through [F6]. [F3] and [F4] move the window
up and down one line, respectively. Pressing backslash before
either of these keys results in the same function being executed,
except with 20-line instead of 1-line motion increments. Keys
[F5] and [F6] perform a similar function for movements of the
window left and right. Without a prior backslash, the motion is a
half-"column" (8 characters), whereas with a prior backslash, the
motion is a full 4 "columns" (64 characters). Rather than
performing this motion with a scroll, these window movement
routines update the screen by simply invoking the View function
on completion. Assembler scrolling routines might be an
interesting area for concentration in program updates.
VII. TEXT PROCESSING KEYS.
One of the major advantages of a computer worksheet over a
typewriter worksheet lies in the ability to reorganize whole
lines in a manuscript. The BASIC editor is weak in this area,
and hence several programmed functions have been designed to
provide this ability. Emphasis has been on easy-to-remember line
operations with optional block capability, for the benefit of
those whose use of the computer for text processing is only
part time.
The two simplest functions are Yank [F7] and Put [F8]. The
first simply "yanks" a copy of a block of lines, beginning at the
cursor position, and puts it into memory variable M$(). The
Delete function (backslash+[F7]) provides a "destructive" Yank,
in which the chosen block is copied into memory and removed from
the text. Thus it provides a way to delete whole lines. The Put
function [F8], as you might guess, simply inserts the last Yanked
block into text at the indicated cursor location. One can, for
example, insert blank lines into text where needed by simply
Yanking one blank line, and then replicating it using Put at the
desired locations.
For the occassions when one wants to insert new text into
the midst of pre-existing text, the Line-Insert command
(backslash+[F8]) causes the existing cursor to "split", opening
up a new line of text. This insertion loop only accepts text
typed into the newly opened line. As each line is Entered into
the working file in the usual way, another "insertion" line is
opened up after. Any other command key or just the backslash
will put the cursor back together into one piece, close up the
present "insertion" line, and return you to the full screen
editor.
The last (and longest) of the text processing functions,
Justify, allows you to right-justify text to an arbitrary width.
This trick is quite difficult to do with an ordinary typewriter.
The desired linewidth is requested the first time the Justify key
[F9] is pushed. Afterwards, it can be respecified with the
J-Options function (backslash+[F9]). This function also allows
you to right-justify arbitrarily large blocks, rather than doing
it line by line.
One of the reasons for the amount of code requried by the
Justify function is that it gives special status to indented
lines, lest it be tempted to run paragraphs together. Although
this implemented logic allows one to use Justify automatically on
whole blocks of text at once, it also prevents it from operating
(at least in the current version) on indented paragraphs. If you
must justify indented text, it is therefore recommended that you
type the text without indentation, justify it, and then indent
(either with the editor, or while printing).
Finally, although Justify adds spaces between words when
they are needed, it has not been allowed to remove them. For
that reason, lest you want spaces to multiply without bound, it
is best to justify each line no more than once. Obviously, then
it is also best to begin with the first line in a paragraph, and
work your way down.
VIII. SPREADSHEET PROGRAMMING.
Given a large wordsheet with text editing capabilities,
wouldn't it be nice to also have the option of programming it, so
that various portions of the sheet automatically reflect the
state of other portions of the sheet? Thanks to the string
handling and computational ability of MS-BASIC, this is a
remarkably easy thing to do. PC\PAD aids the user in doing this
by providing a set of subroutines for wordsheet access, and a
Computation function [F2] for merging and running BASIC
instructions for wordsheet formatting.
The 4 subroutines available in this version of PC\PAD are
(a) the function FNV(I,J) which reads the "numerical value" (see
the BASIC function VAL) from the wordsheet cell in line I, column
J; (b) subroutines 9900 and 9920 which insert, respectively, the
number X and the string X$ into the cell at line I, column J in
the wordsheet; and (c) subroutine 9630 for forming column and row
sums given line/column of the top-left cell (NROW0/NCOL0) and the
number of rows and columns to be summed (NROW/NCOL).
An example of the use of these subroutines is illustrated in
the demonstration file DEMOPAD using the 5-line instruction
program ROWCOL.BAS. Once the instruction program is in place
(it is first merged, on naming, into program lines 10000 and up),
one simply presses [F2] to update the computations. The
flexibility of MS-BASIC for this kind of application is
impressive, and I look forward to an expanding library of
specific solutions as the spreadsheet capability of PC\PAD has a
chance to mature. User ideas and suggestions are most welcome.
PC\PAD requires of the instruction program that it: (i) has
lines numbered from 10000 and up; (ii) includes the statement
"ON ERROR GOTO 5000" to invoke error trapping which seems to be
cancelled during the CHAIN MERGE operation; (iii) return program
control to the View function (line 410) after completion; and
(iv) be stored as an ASCII file on disk. Because of the need for
specific line references in the main program, one must also be
careful about renumbering the main routine independently.
IX. SAVING AND PRINTING.
As already mentioned, the Save function [F10] places the
current working file on disk in a file with the working filename.
The working filename can be changed using the Reset Filenames
function (backslash+[F2]) mentioned above. You should make it a
habit to save your work periodically during a long working
session, to minimize the loss in case of a power failure or
memory lapse later on.
The other method for outputting the file is to print it
using the Print routine (backslash+[F10]). This routine asks a
lot of questions, but basically if you want to print the whole
file in normal 80-column format without indenting, you just
answer all the questions with return. I usually work with
un-indented text files (for use with the Justify routine), and
print rough drafts in this default format except for 1" margins
and a 10 space indentation.
The large number of questions that are asked allow you to
access a wide range of printer options. In doing scientific
writing, for example, in which superscripts and subscripts are
abundant, I create a triple-spaced text file in the computer,
with super and sub-scripts on the intervening lines, and then
print out using 1/3 normal line spacing: Viola!.....
professional-looking super and sub-scripted single-spaced text in
a variety of character sizes and intensities.
X. FUTURE DIRECTIONS.
One shortcoming of this version of PC\PAD that becomes
apparent with larger files (probably because of the variable
storage size of BASIC strings) is speed. Two easy things that
could help are (a) "squishing" of the listing to remove comments
and increase number of commands per line; and (b) compiling. If
I can come up with a compiled version, I will try to make it
available with the next upgrade. Moreover, if there is tangible
user support for the design philosophy of this program, some
assembler programming of crucial routines would be one of the
first items on the menu.
XI. DISCLAIMER.
In no event will the author be liable to you for any
damages, including any lost profits, lost savings or other
incidental or consequential damages arising out of the use of or
inability to use these programs, even if the author has been
advised of the possibility of such damages, or for any claim by
any other party.
the author has been
advised of the possibility of such damages, or for any claim by
any other party.